/*
 * @Description: 同分组调序
 * @Author: Zzt
 * @Date: 2022-11-01 09:36:13
 * @LastEditTime: 2022-11-01 11:19:13
 */
import { Button } from 'antd';
import { useMemo, useState } from 'react';
import GroupReorderDialog from '../dialogs/GroupReorderDialog';

const GroupReorder = (props: any) => {
  const { selectItems } = props;
  const [visible, setVisible] = useState(false);
  const groupReorder = () => {
    setVisible(true);
  };
  return (
    <>
      <Button disabled={selectItems.length !== 1} onClick={groupReorder}>
        同分组调序
      </Button>
      {useMemo(
        () => (
          <GroupReorderDialog
            visible={visible}
            // outIn={list}
            // query={baseInfo.param}
            // info={upperInfo}
            onClose={() => {
              setVisible(false);
            }}
          />
        ),
        [visible]
      )}
    </>
  );
};
export default GroupReorder;
